<html xmlns:th="http://www.thymeleaf.org">
<div th:fragment="nav">
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Ly论坛</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li><a onclick="skip_to(INDEX,'')" href="javascript:void(0)"><i class="icon-home"></i> 首页 <span class="sr-only">(current)</span></a></li>
                    <li><a onclick="skip_to(HOT_INDEX,'')" href="javascript:void(0)"><i class="icon-fire"></i> 景点信息</a></li>
                    <li><a onclick="skip_to(FORUM_INDEX,'')" href="javascript:void(0)"><i class="icon-star-half-empty"></i> 论坛版块</a></li>
                    <li><a onclick="skip_to(SAFE_INDEX,'')" href="javascript:void(0)"><i class="icon-book"></i> 安全知识</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#" class="dropdown-toggle" onclick="showNotice()" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="icon-bullhorn">公告</i> </a></li>
                    <li th:if="${session.id!=null}"><a href="#" class="dropdown-toggle" onclick="showMessage()" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="icon-envelope">&nbsp;<small><span id="message_nums"></span></small>条新消息</i> </a></li>
                    <li th:if="${session.id!=null}" class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="icon-user"></i> <span th:text="${session.nickname}"></span> <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a onclick="skip_to(USER_INDEX,'')" href="javascript:void(0)"><i class="icon-home"></i> 个人主页</a></li>
                            <li><a onclick="skip_to(USER_SET,'')" href="javascript:void(0)"><i class="icon-cog"></i> 设置</a></li>
                            <li><a onclick="userLogout()" href="javascript:void(0)"><i class="icon-signout"></i> 注销</a></li>
                            <li role="separator" class="divider"></li>
                            <!--<li><a href="#"><i class="icon-wrench"></i> 帮助</a></li>-->
                        </ul>
                    </li>
                    <li th:if="${session.id==null}"><a onclick="showLogin()" ><i class=""></i> 登录</a></li>
                    <li th:if="${session.id==null}"><a onclick="showRegister()"><i class=""></i> 注册</a></li>
                </ul>
            </div>
        </div>
    </nav>
</div>